import request from "@/utils/request";

// 疾病治疗
// 就诊记录
export function jiuzhenjiIndex (params = {}) {
  return request({
    url: 'jiuzhenji/index',
    method: 'get',
    params
  })
}
// 查询就诊人
export function jiuZhenUserInfo (params = {}) {
  return request({
    url: '/elder/search',
    method: 'get',
    params
  })
}
// 就诊详情
export function jiuzhenjiInfo (params = {}) {
  return request({
    url: 'jiuzhenji/info',
    method: 'get',
    params
  })
}
//添加就诊记录
export function jiuzhenjiAdd (data = {}) {
  return request({
    url: 'jiuzhenji/add',
    method: 'post',
    data,
    isJSON: false
  })
}
//删除就诊记录
export function jiuzhenjiDelete (params = {}) {
  return request({
    url: 'jiuzhenji/delete',
    method: 'get',
    params
  })
}
//就诊老人列表
export function jiuzhenjiOlder (params = {}) {
  return request({
    url: 'jiuzhenji/older',
    method: 'get',
    params
  })
}
//老人就诊记录
export function jiuzhenjiLog (params = {}) {
  return request({
    url: 'jiuzhenji/log',
    method: 'get',
    params
  })
}
//删除老人所有就诊记录
export function jiuzhenjiDeleteall (params = {}) {
  return request({
    url: 'jiuzhenji/deleteall',
    method: 'get',
    params
  })
}



// 慢性病管理
// 就诊记录
export function jiuzhenmanIndex (params = {}) {
  return request({
    url: 'jiuzhenman/index',
    method: 'get',
    params
  })
}
// 就诊详情
export function jiuzhenmanInfo (params = {}) {
  return request({
    url: 'jiuzhenman/info',
    method: 'get',
    params
  })
}
//添加就诊记录
export function jiuzhenmanAdd (data = {}) {
  return request({
    url: 'jiuzhenman/add',
    method: 'post',
    data,
    isJSON: false
  })
}
//删除就诊记录
export function jiuzhenmanDelete (params = {}) {
  return request({
    url: 'jiuzhenman/delete',
    method: 'get',
    params
  })
}
//就诊老人列表
export function jiuzhenmanOlder (params = {}) {
  return request({
    url: 'jiuzhenman/older',
    method: 'get',
    params
  })
}
//老人就诊记录
export function jiuzhenmanLog (params = {}) {
  return request({
    url: 'jiuzhenman/log',
    method: 'get',
    params
  })
}
//删除老人所有就诊记录
export function jiuzhenmanDeleteall (params = {}) {
  return request({
    url: 'jiuzhenman/deleteall',
    method: 'get',
    params
  })
}
// 同意出库
export function agreeRemove (data = {}) {
  return request({
    url: 'output/agree',
    method: 'post',
    data,
    isJSON: false
  })
}

// 驳回出库
export function removeDisagree (data = {}) {
  return request({
    url: 'output/disagree',
    method: 'post',
    data,
    isJSON: false
  })
}

// 库存列表

export function stockList (params = {}) {
  return request({
    url: 'que/list',
    method: 'get',
    params
  })
}
// 添加库存不足记录
export function addStockList (data = {}) {
  return request({
    url: 'que/add',
    method: 'post',
    data,
    isJSON: false
  })
}
// 删除库存不足记录
export function deleteStockList (data = {}) {
  return request({
    url: 'que/delete',
    method: 'post',
    data,
    isJSON: false
  })
}
